package web.java.demo.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class FilterInvalidCharServlet extends HttpServlet {
	public void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//获取数据
		request.setCharacterEncoding("utf-8");
		String content=(String)request.getAttribute("content");
		//显示在jsp页面上
		request.setAttribute("content",content);
		//转发到原jsp页面
		request.getRequestDispatcher("chart.jsp").forward(request,response);
	}
}
